package financial.sharing.center.common.enums;

/**
 * @ClassName ReceivableAccruedOperationStageEnum
 * @Description TODO
 * @Author guoyuhang
 * @ @csdn https://blog.csdn.net/qq_40788718
 * @Date 2021/4/18
 * @Version 1.0
 */
public enum AccruedOperationStageEnum {

    无("无", 0),
    已创建("已创建", 1),
    已审核("已审核", 2),
    勾稽中("勾稽中", 3),
    已完成("已完成", 4);

    private final String name;

    private final Integer value;

    AccruedOperationStageEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public Integer getValue() {
        return this.value;
    }

    public static AccruedOperationStageEnum name2Enum(String value) {
        for (AccruedOperationStageEnum tempEnum : AccruedOperationStageEnum.values()) {
            if(tempEnum.getName().equals(value)) {
                return tempEnum;
            }
        }
        return null;
    }

    public static AccruedOperationStageEnum int2Enum(Integer value) {
        for (AccruedOperationStageEnum tempEnum : AccruedOperationStageEnum.values()) {
            if(tempEnum.getValue().equals(value)) {
                return tempEnum;
            }
        }
        return null;
    }

}
